#include "animation.h"
#include "../SGD Wrappers/SGD_GraphicsManager.h"

void animation::Render(SGD::Point position, float rotation, float timer, float scale, int colorA, int colorR, int colorG, int colorB)
{
	SGD::GraphicsManager::GetInstance()->DrawTextureSection(image, position,
		SGD::Rectangle{initPos.x+(currCellCol*cellSize.width),initPos.y+(currCellRow*cellSize.height),
					   initPos.x + (currCellCol * cellSize.width) + cellSize.width, initPos.y + (currCellRow * cellSize.height) + cellSize.height },
					   rotation, { cellSize.width / 2, cellSize.height / 2 }, { (int)(timer * colorA), colorR, colorG, colorB }, { scale, scale });
}
